package org.jsola.hr.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;
import org.jsola.core.dto.BaseDTO;

import javax.validation.constraints.NotNull;

import static org.jsola.hr.example.MissionCenterExample.E_FILE_NAME;
import static org.jsola.hr.example.MissionCenterExample.E_FILE_TYPE;
import static org.jsola.hr.example.MissionCenterExample.E_FILE_URL;
import static org.jsola.hr.example.MissionCenterExample.E_MISSION_MODE;
import static org.jsola.hr.example.MissionCenterExample.E_MISSION_NAME;
import static org.jsola.hr.example.MissionCenterExample.E_MONTH;
import static org.jsola.hr.example.MissionCenterExample.E_RECEIVE_JSON;
import static org.jsola.hr.example.MissionCenterExample.E_REMARK;
import static org.jsola.hr.example.MissionCenterExample.E_STATE;
import static org.jsola.hr.example.MissionCenterExample.E_SUBJECT_ID;
import static org.jsola.hr.example.MissionCenterExample.E_SUBJECT_TYPE;
import static org.jsola.hr.example.MissionCenterExample.E_TABLE_HEAD;
import static org.jsola.hr.example.MissionCenterExample.E_TIME;
import static org.jsola.hr.example.MissionCenterExample.E_YEAR;
import static org.jsola.hr.example.MissionCenterExample.M_FILE_NAME_MAX;
import static org.jsola.hr.example.MissionCenterExample.M_FILE_URL_MAX;
import static org.jsola.hr.example.MissionCenterExample.M_MISSION_MODE_MAX;
import static org.jsola.hr.example.MissionCenterExample.M_MISSION_MODE_NOT_NULL;
import static org.jsola.hr.example.MissionCenterExample.M_MISSION_NAME_MAX;
import static org.jsola.hr.example.MissionCenterExample.M_MISSION_NAME_NOT_NULL;
import static org.jsola.hr.example.MissionCenterExample.M_MONTH_MAX;
import static org.jsola.hr.example.MissionCenterExample.M_MONTH_NOT_NULL;
import static org.jsola.hr.example.MissionCenterExample.M_RECEIVE_JSON_MAX;
import static org.jsola.hr.example.MissionCenterExample.M_REMARK_MAX;
import static org.jsola.hr.example.MissionCenterExample.M_STATE_NOT_NULL;
import static org.jsola.hr.example.MissionCenterExample.M_SUBJECT_ID_MAX;
import static org.jsola.hr.example.MissionCenterExample.M_SUBJECT_ID_NOT_NULL;
import static org.jsola.hr.example.MissionCenterExample.M_SUBJECT_TYPE_NOT_NULL;
import static org.jsola.hr.example.MissionCenterExample.M_TABLE_HEAD_MAX;
import static org.jsola.hr.example.MissionCenterExample.M_TIME_MAX;
import static org.jsola.hr.example.MissionCenterExample.M_YEAR_MAX;
import static org.jsola.hr.example.MissionCenterExample.M_YEAR_NOT_NULL;
import static org.jsola.hr.example.MissionCenterExample.N_FILE_NAME;
import static org.jsola.hr.example.MissionCenterExample.N_FILE_TYPE;
import static org.jsola.hr.example.MissionCenterExample.N_FILE_URL;
import static org.jsola.hr.example.MissionCenterExample.N_MISSION_MODE;
import static org.jsola.hr.example.MissionCenterExample.N_MISSION_NAME;
import static org.jsola.hr.example.MissionCenterExample.N_MONTH;
import static org.jsola.hr.example.MissionCenterExample.N_RECEIVE_JSON;
import static org.jsola.hr.example.MissionCenterExample.N_REMARK;
import static org.jsola.hr.example.MissionCenterExample.N_STATE;
import static org.jsola.hr.example.MissionCenterExample.N_SUBJECT_ID;
import static org.jsola.hr.example.MissionCenterExample.N_SUBJECT_TYPE;
import static org.jsola.hr.example.MissionCenterExample.N_TABLE_HEAD;
import static org.jsola.hr.example.MissionCenterExample.N_TIME;
import static org.jsola.hr.example.MissionCenterExample.N_YEAR;

/**
 * 任务调度中心任务表
 *
 * @author zhr
 */
@EqualsAndHashCode(callSuper = true)
@ApiModel(description = "新增【任务调度中心任务表】的参数")
@Data
public class MissionCenterAddDTO extends BaseDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(notes = N_SUBJECT_ID, example = E_SUBJECT_ID, required = true)
    @NotNull(message = M_SUBJECT_ID_NOT_NULL)
    @Length(max = 2147483647, message = M_SUBJECT_ID_MAX)
    private String subjectId;

    @ApiModelProperty(notes = N_SUBJECT_TYPE, example = E_SUBJECT_TYPE, required = true)
    @NotNull(message = M_SUBJECT_TYPE_NOT_NULL)
    private Integer subjectType;

    @ApiModelProperty(notes = N_STATE, example = E_STATE, required = true)
    @NotNull(message = M_STATE_NOT_NULL)
    private Integer state;

    @ApiModelProperty(notes = N_MISSION_NAME, example = E_MISSION_NAME, required = true)
    @NotNull(message = M_MISSION_NAME_NOT_NULL)
    @Length(max = 100, message = M_MISSION_NAME_MAX)
    private String missionName;

    @ApiModelProperty(notes = N_TABLE_HEAD, example = E_TABLE_HEAD)
    @Length(max = 2147483647, message = M_TABLE_HEAD_MAX)
    private String tableHead;

    @ApiModelProperty(notes = N_RECEIVE_JSON, example = E_RECEIVE_JSON)
    @Length(max = 2147483647, message = M_RECEIVE_JSON_MAX)
    private String receiveJson;

    @ApiModelProperty(notes = N_REMARK, example = E_REMARK)
    @Length(max = 50, message = M_REMARK_MAX)
    private String remark;

    @ApiModelProperty(notes = N_FILE_URL, example = E_FILE_URL)
    @Length(max = 2147483647, message = M_FILE_URL_MAX)
    private String fileUrl;

    @ApiModelProperty(notes = N_FILE_TYPE, example = E_FILE_TYPE)
    private Integer fileType;

    @ApiModelProperty(notes = N_FILE_NAME, example = E_FILE_NAME)
    @Length(max = 50, message = M_FILE_NAME_MAX)
    private String fileName;

    @ApiModelProperty(notes = N_MISSION_MODE, example = E_MISSION_MODE, required = true)
    @NotNull(message = M_MISSION_MODE_NOT_NULL)
    @Length(max = 50, message = M_MISSION_MODE_MAX)
    private String missionMode;

    @ApiModelProperty(notes = N_YEAR, example = E_YEAR, required = true)
    @NotNull(message = M_YEAR_NOT_NULL)
    @Length(max = 4, message = M_YEAR_MAX)
    private String year;

    @ApiModelProperty(notes = N_MONTH, example = E_MONTH, required = true)
    @NotNull(message = M_MONTH_NOT_NULL)
    @Length(max = 2, message = M_MONTH_MAX)
    private String month;

    @ApiModelProperty(notes = N_TIME, example = E_TIME)
    @Length(max = 20, message = M_TIME_MAX)
    private String time;


}

